package com.example.service.impl;


import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.example.entity.Ignin;
import com.example.mapper.IgninMapper;
import com.example.mapper.IntegralMapper;
import com.example.service.IIgninService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author tyhxzy
 * @since 2023-11-03
 */
@Service
public class IgninServiceImpl implements IIgninService {
    @Autowired
    private IgninMapper igninMapper;
    @Override
    public int addPhone(Ignin ignin) {
        return igninMapper.addPhone(ignin);
    }

    @Override
    public Ignin findPhone(Ignin ignin) {
        return igninMapper.selectOne(Wrappers.lambdaQuery(Ignin.class).eq(Ignin::getPhone, ignin.getPhone()));
    }
    //逻辑删除
    @Override
    public int deleteById(Integer id,Integer del) {
        return igninMapper.update(id,del);
    }

    @Override
    public int findDeleted(Integer id) {
        return igninMapper.findByDeletedInt(id);
    }
}
